Integrand size = 23, antiderivative size = 90 \[ \int \frac {\sec ^5(c+d x)}{a+b \tan ^2(c+d x)} \, dx=-\frac {(2 a-3 b) \text {arctanh}(\sin (c+d x))}{2 b^2 d}+\frac {(a-b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b^2 d}+\frac {\sec (c+d x) \tan (c+d x)}{2 b d} \]
[Out]
Time = 0.16 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3757, 425, 536, 212, 214} \[ \int \frac {\sec ^5(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {(a-b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b^2 d}-\frac {(2 a-3 b) \text {arctanh}(\sin (c+d x))}{2 b^2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 b d} \]
[In]
[Out]
Rule 212
Rule 214
Rule 425
Rule 536
Rule 3757
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{\left (1-x^2\right )^2 \left (a-(a-b) x^2\right )} \, dx,x,\sin (c+d x)\right )}{d} \\ & = \frac {\sec (c+d x) \tan (c+d x)}{2 b d}+\frac {\text {Subst}\left (\int \frac {-a+2 b+(-a+b) x^2}{\left (1-x^2\right ) \left (a+(-a+b) x^2\right )} \, dx,x,\sin (c+d x)\right )}{2 b d} \\ & = \frac {\sec (c+d x) \tan (c+d x)}{2 b d}-\frac {(2 a-3 b) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{2 b^2 d}+\frac {(a-b)^2 \text {Subst}\left (\int \frac {1}{a+(-a+b) x^2} \, dx,x,\sin (c+d x)\right )}{b^2 d} \\ & = -\frac {(2 a-3 b) \text {arctanh}(\sin (c+d x))}{2 b^2 d}+\frac {(a-b)^{3/2} \text {arctanh}\left (\frac {\sqrt {a-b} \sin (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} b^2 d}+\frac {\sec (c+d x) \tan (c+d x)}{2 b d} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(207\) vs. \(2(90)=180\).
Time = 1.47 (sec) , antiderivative size = 207, normalized size of antiderivative = 2.30 \[ \int \frac {\sec ^5(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {2 (2 a-3 b) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )+2 (-2 a+3 b) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )-\frac {2 (a-b)^{3/2} \log \left (\sqrt {a}-\sqrt {a-b} \sin (c+d x)\right )}{\sqrt {a}}+\frac {2 (a-b)^{3/2} \log \left (\sqrt {a}+\sqrt {a-b} \sin (c+d x)\right )}{\sqrt {a}}+\frac {b}{\left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}-\frac {b}{\left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}}{4 b^2 d} \]
[In]
[Out]
Time = 6.52 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.43
method | result | size |
derivativedivides | \(\frac {-\frac {1}{4 b \left (\sin \left (d x +c \right )+1\right )}+\frac {\left (-2 a +3 b \right ) \ln \left (\sin \left (d x +c \right )+1\right )}{4 b^{2}}-\frac {1}{4 b \left (\sin \left (d x +c \right )-1\right )}+\frac {\left (2 a -3 b \right ) \ln \left (\sin \left (d x +c \right )-1\right )}{4 b^{2}}-\frac {\left (-a^{2}+2 a b -b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right )}{b^{2} \sqrt {a \left (a -b \right )}}}{d}\) | \(129\) |
default | \(\frac {-\frac {1}{4 b \left (\sin \left (d x +c \right )+1\right )}+\frac {\left (-2 a +3 b \right ) \ln \left (\sin \left (d x +c \right )+1\right )}{4 b^{2}}-\frac {1}{4 b \left (\sin \left (d x +c \right )-1\right )}+\frac {\left (2 a -3 b \right ) \ln \left (\sin \left (d x +c \right )-1\right )}{4 b^{2}}-\frac {\left (-a^{2}+2 a b -b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \sin \left (d x +c \right )}{\sqrt {a \left (a -b \right )}}\right )}{b^{2} \sqrt {a \left (a -b \right )}}}{d}\) | \(129\) |
risch | \(-\frac {i \left ({\mathrm e}^{3 i \left (d x +c \right )}-{\mathrm e}^{i \left (d x +c \right )}\right )}{d b \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a}{d \,b^{2}}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d b}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a}{d \,b^{2}}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d b}+\frac {\sqrt {a \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {a \left (a -b \right )}\, {\mathrm e}^{i \left (d x +c \right )}}{a -b}-1\right )}{2 d \,b^{2}}-\frac {\sqrt {a \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {a \left (a -b \right )}\, {\mathrm e}^{i \left (d x +c \right )}}{a -b}-1\right )}{2 a d b}-\frac {\sqrt {a \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {a \left (a -b \right )}\, {\mathrm e}^{i \left (d x +c \right )}}{a -b}-1\right )}{2 d \,b^{2}}+\frac {\sqrt {a \left (a -b \right )}\, \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {a \left (a -b \right )}\, {\mathrm e}^{i \left (d x +c \right )}}{a -b}-1\right )}{2 a d b}\) | \(364\) |
[In]
[Out]
none
Time = 0.32 (sec) , antiderivative size = 292, normalized size of antiderivative = 3.24 \[ \int \frac {\sec ^5(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\left [-\frac {2 \, {\left (a - b\right )} \sqrt {\frac {a - b}{a}} \cos \left (d x + c\right )^{2} \log \left (-\frac {{\left (a - b\right )} \cos \left (d x + c\right )^{2} + 2 \, a \sqrt {\frac {a - b}{a}} \sin \left (d x + c\right ) - 2 \, a + b}{{\left (a - b\right )} \cos \left (d x + c\right )^{2} + b}\right ) + {\left (2 \, a - 3 \, b\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (2 \, a - 3 \, b\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, b \sin \left (d x + c\right )}{4 \, b^{2} d \cos \left (d x + c\right )^{2}}, -\frac {4 \, {\left (a - b\right )} \sqrt {-\frac {a - b}{a}} \arctan \left (\sqrt {-\frac {a - b}{a}} \sin \left (d x + c\right )\right ) \cos \left (d x + c\right )^{2} + {\left (2 \, a - 3 \, b\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (2 \, a - 3 \, b\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, b \sin \left (d x + c\right )}{4 \, b^{2} d \cos \left (d x + c\right )^{2}}\right ] \]
[In]
[Out]
\[ \int \frac {\sec ^5(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\int \frac {\sec ^{5}{\left (c + d x \right )}}{a + b \tan ^{2}{\left (c + d x \right )}}\, dx \]
[In]
[Out]
Exception generated. \[ \int \frac {\sec ^5(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
none
Time = 0.50 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.46 \[ \int \frac {\sec ^5(c+d x)}{a+b \tan ^2(c+d x)} \, dx=-\frac {\frac {{\left (2 \, a - 3 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) + 1 \right |}\right )}{b^{2}} - \frac {{\left (2 \, a - 3 \, b\right )} \log \left ({\left | \sin \left (d x + c\right ) - 1 \right |}\right )}{b^{2}} - \frac {4 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \arctan \left (-\frac {a \sin \left (d x + c\right ) - b \sin \left (d x + c\right )}{\sqrt {-a^{2} + a b}}\right )}{\sqrt {-a^{2} + a b} b^{2}} + \frac {2 \, \sin \left (d x + c\right )}{{\left (\sin \left (d x + c\right )^{2} - 1\right )} b}}{4 \, d} \]
[In]
[Out]
Time = 13.71 (sec) , antiderivative size = 268, normalized size of antiderivative = 2.98 \[ \int \frac {\sec ^5(c+d x)}{a+b \tan ^2(c+d x)} \, dx=-\frac {\left (\frac {\mathrm {atanh}\left (\frac {\sin \left (c+d\,x\right )\,\sqrt {a-b}}{\sqrt {a}}\right )\,{\left (a-b\right )}^{3/2}\,1{}\mathrm {i}}{2}-a^{3/2}\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )-a^{3/2}\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,\cos \left (2\,c+2\,d\,x\right )+\frac {\cos \left (2\,c+2\,d\,x\right )\,\mathrm {atanh}\left (\frac {\sin \left (c+d\,x\right )\,\sqrt {a-b}}{\sqrt {a}}\right )\,{\left (a-b\right )}^{3/2}\,1{}\mathrm {i}}{2}\right )\,1{}\mathrm {i}}{\sqrt {a}\,b^2\,d\,\left (\frac {\cos \left (2\,c+2\,d\,x\right )}{2}+\frac {1}{2}\right )}-\frac {\left (\frac {\sqrt {a}\,\sin \left (c+d\,x\right )\,1{}\mathrm {i}}{2}+\frac {3\,\sqrt {a}\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{2}+\frac {3\,\sqrt {a}\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )\,1{}\mathrm {i}}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )\,\cos \left (2\,c+2\,d\,x\right )}{2}\right )\,1{}\mathrm {i}}{\sqrt {a}\,b\,d\,\left (\frac {\cos \left (2\,c+2\,d\,x\right )}{2}+\frac {1}{2}\right )} \]
[In]
[Out]